package KMLGenerator;

/**
 * This class represents a vert on the agreement map.
 * @author Andrea Piermarteri, Matteo Micheletti, Diego Cervellini
 *
 */
public class MapVert {
	public String name;
	public String description;
	double c1;
	double c2;
	double c3;
	public MVStyle style;
	
	/**
	 * Constructor of MapVert.
	 * @param name
	 * @param description
	 * @param c1
	 * @param c2
	 * @param c3
	 * @param style
	 */
	public MapVert(String name, String description, double c1, double c2,
			double c3, MVStyle style) {
		this.name = name;
		this.description = description;
		this.c1 = c1;
		this.c2 = c2;
		this.c3 = c3;
		this.style = style;
	}

	/**
	 * Constructor of MapVert without style.
	 * @param name
	 * @param description
	 * @param c1
	 * @param c2
	 * @param c3
	 */
	public MapVert(String name, String description, double c1, double c2, double c3) {
		this.name = name;
		this.description = description;
		this.c1 = c1;
		this.c2 = c2;
		this.c3 = c3;
		this.style = null;
	}
	
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public double getC1() {
		return c1;
	}

	public void setC1(double c1) {
		this.c1 = c1;
	}

	public double getC2() {
		return c2;
	}

	public void setC2(double c2) {
		this.c2 = c2;
	}

	public double getC3() {
		return c3;
	}

	public void setC3(double c3) {
		this.c3 = c3;
	}

	public MVStyle getStyle() {
		return style;
	}

	public void setStyle(MVStyle style) {
		this.style = style;
	}
	
	/**
	 * @override
	 * Checks the equality of two MapVerts.
	 */
	public boolean equals(Object p){
		if((p instanceof MapVert) && this.getName().equals(((MapVert)p).getName())) return true;
		else return false;
	}
}
